# -*- coding: utf-8 -*-
"""
Created on Thu Nov 29 23:12:05 2012

@author: nico
"""

import matplotlib.pyplot as plt
import numpy
import time

hl, = plt.plot([], [])

def update_line(hl, new_data):
    hl.set_xdata(numpy.append(hl.get_xdata(), new_data))
    hl.set_ydata(numpy.append(hl.get_ydata(), new_data))
    plt.draw()
    
for i in range(10):
    update_line(hl, i)
    time.sleep(1)